
function drawGraph(context, baseX, graph){
	
	context.beginPath();  

	  // Create Axis
	  context.beginPath();  
	  context.moveTo(graph.axis.width, graph.axis.height);  
	  context.lineTo(0,graph.axis.height);  
	  context.lineTo(0, 0);  
	  context.stroke();	
	
	  // Draw curve
	var firstLoop = true;
	for(var i=0;i<graph.points.length;i++){
		if (firstLoop){
			context.moveTo(tabPoints[i].x, graph.axis.height-tabPoints[i].y);
			context.fillText(tabPoints[i].name, tabPoints[i].x, graph.axis.height-tabPoints[i].y);
			firstLoop=false;
		} else {
			context.lineTo(tabPoints[i].x, baseY-tabPoints[i].y);
			context.fillText(tabPoints[i].name, tabPoints[i].x, graph.axis.height-tabPoints[i].y);
		}
	}
	context.stroke();
}